check_help() {

    command="$1"
    printf "\n"
    echo $command

    listhelp="$(./xrnlib-cli --help $command | tail -n +3 | sed -E 's/^(.{1,50}).*$/\1/' |  sed '/^a valid example/q' | head -n -1 | tr -s '\n' ' ' | sed 's/^.//; s/.$//' | tr ' ' '\n' | sort | uniq | tr '\n' ' ')"

    listexamples=""
    counter=1
    while [ $counter -le 5000 ]
    do
        listexample="$(./xrnlib-cli --example -rnd $command | tr -s '\\' ' ' | tr -s '//' ' ' | tr -s '\n' ' ' | tr -s ' ' '\n' | awk '/^-{1,2}[a-zA-Z0-9_]+/ {print}'  | sort | tr '\n' ' ')"
        listexamples="${listexamples} ${listexample}"
        listexamples=$(echo "$listexamples" | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
        counter=$((counter + 1))
    done

    unique_to_string1=$(echo "$listhelp $listexamples" | tr ' ' '\n' | sort | uniq -u | tr -s '\n' ' ')

    if [ -z "$unique_to_string1" ]; then
        echo "correct"
    else

        echo "help    list: " $listhelp
        echo "example list: " $listexamples
        echo "fail    list: " $unique_to_string1
    fi
}

#check_help "dump-encoding-param"
#check_help "mine-xmatrix-comp-rnd"
#check_help "mine-xmatrix-comp-ot"
#check_help "permute-xmatrix-comp-random"
#check_help "permute-xmatrix-comp-deterministic"
#check_help "permute-xmatrix-comp-confidential"
#check_help "decompress-xmatrix"
#check_help "check-xmatrix-comp"
#check_help "check-xmatrix"
#check_help "make-point"
#check_help "make-confidential-pseudo-random-number"
#check_help "make-start-point"
#check_help "make-monomial-key"
#check_help "make-binomial-key"
#check_help "exchange-monomial-key"
#check_help "make-monovalent-key"
#check_help "exchange-polyvalent-key"
#check_help "check-monovalent-key"
#check_help "make-commitment-binomial-key"
#check_help "make-commitment-sym-signature"
#check_help "make-commitment-sym-certificate"
#check_help "make-response"
#check_help "make-monomial-proof"
#check_help "make-monomial-proof-sym-signature"
#check_help "make-monomial-proof-sym-certificate"
#check_help "check-monomial-proof"
#check_help "check-monomial-proof-sym-signature"
#check_help "check-monomial-proof-sym-certificate"
#check_help "make-signature-symmetric"
#check_help "make-signature-asymmetric"
#check_help "make-ring-signature"
#check_help "permute-ring-signature"
#check_help "make-certificate-symmetric"
#check_help "make-certificate-asymmetric"
#check_help "check-signature-symmetric"
#check_help "check-signature-asymmetric"
#check_help "check-ring-signature"
#check_help "check-certificate-symmetric"
#check_help "check-certificate-asymmetric"
#check_help "make-hash"
#check_help "make-checksum"
#check_help "check-hash"
#check_help "check-checksum"

#check_help "convert-hash-to-monomial-key"
#check_help "convert-hash-to-point"
#check_help "convert-point-to-monomial-key"
#check_help "convert-monomial-key-to-point"
#check_help "convert-binomial-key-to-start-point"
#check_help "convert-start-point-to-point"
#check_help "convert-point-to-start-point"
#check_help "convert-monomial-key-to-monomial-commitment"
#check_help "convert-monomial-commitment-to-monomial-key"
#check_help "convert-symmetric-certificate-to-monovalent-key"
#check_help "convert-asymmetric-certificate-to-binomial-key"
#check_help "convert-asymmetric-signature-to-binomial-key"
#check_help "convert-symmetric-signature-to-binomial-key"
#check_help "convert-binomial-key-to-asymmetric-signature"
#check_help "convert-binomial-key-to-symmetric-signature"

#check_help "split-symmetric"
#check_help "join-symmetric"
#check_help "encrypt-symmetric"
#check_help "encrypt-asymmetric"
#check_help "decipher-symmetric"
#check_help "decipher-asymmetric"

#check_help "check-complete-block"
#check_help "make-block"
#check_help "combine-blocks"
#check_help "strip-header-from-block"
#check_help "print-header"
#check_help "print-lib-info"

#check_help "get-capacity"
#check_help "make-steganography-block"
#check_help "extract-steganography-block"
check_help "make-steganography-raw"
check_help "extract-steganography-raw"
